﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.ServiceModel.Configuration;
using System.Text;
using System.Threading.Tasks;

namespace ebMS3dotnet.Core.Configuration
{
    class ebMS3BindingStandardBindingElement : StandardBindingElement
    {
        [ConfigurationProperty("pModes", IsDefaultCollection=true)] 
       
        public PModeCollection PModes
        {
            get
            {
                return (PModeCollection)base["pModes"];
            }
        }

        protected override Type BindingElementType
        {
            get { return typeof(ebMS3Binding); }
        }

        protected override void OnApplyConfiguration(System.ServiceModel.Channels.Binding binding)
        {
            ebMS3Binding bindingInstance = (ebMS3Binding)binding;
        }

        protected override ConfigurationPropertyCollection Properties
        {
            get
            {
               var properties = base.Properties;
               properties.Add(new ConfigurationProperty("pModes", typeof(PModeCollection)));
               return properties;
            }
        }
    }
}
